Using IME context to inflate layout from S_V2 With CL[1],[2] to migrate InputMethodService as the subclass of the new introduced class WindowProviderService in S_V2, IME context resources can be managed by associating the window container of IME window when its display/window configuration changed. So in SoftKeyboard#getDisplayContext, we can get rid of createDisplayContext logic from S_V2 with gated by SDK version and refining the method documentation to make it clear. [1]: Ie565e30ed5dd3f2cfe27355a6dded76dc3adc14b [2]: I64a1614f32d097785915f6105b1813a929e0fe32 Bug: 213118079 Bug: 133825283 Test: manual with below steps 1) adb install -r EditTextVariations.apk 2) adb install -r SoftKeyboard.apk 3) adb shell ime enable com.example.android.softkeyboard/.SoftKeyboard 4) adb shell ime set com.example.android.softkeyboard/.SoftKeyboard5 5) Enable screen auto-rotation 6) Launch EditTextVariations from launcher's shortcut 7) Tap the first EditText field to show IME 8) Rotate the device to the landscape mode 9) Expect the IME should not be shrunk Change-Id: I9a512a90ca43f07236a041d9e82dbd875206f99e 
1 file changed